#ifndef CCPLUGINMANAGER_H
#define CCPLUGINMANAGER_H

//##########################################################################
//#                                                                        #
//#                              CLOUDCOMPARE                              #
//#                                                                        #
//#  This program is free software; you can redistribute it and/or modify  #
//#  it under the terms of the GNU General Public License as published by  #
//#  the Free Software Foundation; version 2 or later of the License.      #
//#                                                                        #
//#  This program is distributed in the hope that it will be useful,       #
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of        #
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          #
//#  GNU General Public License for more details.                          #
//#                                                                        #
//#          COPYRIGHT: CloudCompare project                               #
//#                                                                        #
//##########################################################################

#include <QObject>
#include <QVector>

class PluginInterface;

//! Simply a list of \see ccPluginInterface
using PluginInterfaceList = QList<PluginInterface *>;


class PluginManager : public QObject
{
	Q_OBJECT
	
public:
    ~PluginManager() override = default;
	
    static PluginManager* get();
	
	QStringList pluginPaths();
	
	void loadPlugins();
	
    PluginInterfaceList& pluginList();
	
    void setPluginEnabled( const PluginInterface* plugin, bool enabled );
    bool isEnabled( const PluginInterface* plugin ) const;

    void showAboutDialog();

	
protected:
    explicit PluginManager( QObject* parent = nullptr );

private:
	void loadFromPathsAndAddToList();
	void setupPaths();

	QStringList disabledPluginIIDs() const;
	

    PluginInterfaceList m_pluginList;

    QStringList m_pluginPaths;
    QString m_TranslationPath;
};

#endif
